<?php
use App\Contract;
return [
    'title' =>  '合约',
    'heading' =>  '合约管理',
    'single' => '合约',
    'model' => Contract::class,
    'columns' => [
        'id' => [
            'title' => 'ID'
        ],
        'name' => [
            'title' => '合约名',
        ],
        'cycle' => [
            'title' => '周期（天）',
        ],
        'price' => [
            'title' => '金额（RMB）'
        ],
        'created_at',
        'operation' => [
            'title'  => '管理',
            'output' => function ($value, $model) {
                return $value;
            },
            'sortable' => false,
        ],
    ],
    'edit_fields' => [
        'name' => [
            'title' => '合约名',
            'type' => 'text'
        ],
        'cycle' => [
            'title' => '周期（天）',
        ],
        'price' => [
            'title' => '金额（RMB）'
        ]
    ],
    'filters' => [
        'id' => [
            'title' => 'ID',
        ],
        'name' => [
            'title' => '合约名',
        ],
        'cycle' => [
            'title' => '周期（天）',
        ],
        'price' => [
            'title' => '金额（RMB）'
        ]
    ],

    'rules' => [
        'name' => 'required',
        'cycle' => 'required|integer',
        'price' => 'required|integer',
    ],

    'custom' => [
        'required' => ':attribute 为必填项'
    ]
];